package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class MultipleGroupSpecification {

    private int beginIndex;
    private int endIndex;
    private List<GroupSpecification> groupSpecificationList;

    public MultipleGroupSpecification(List<GroupSpecification> groupSpecificationList) {
        this.beginIndex = groupSpecificationList.get(0).getBeginIndex();
        this.endIndex = groupSpecificationList.get(groupSpecificationList.size() - 1).getEndIndex();
        this.groupSpecificationList = groupSpecificationList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return groupSpecificationList.size();
    }

    public GroupSpecification get(int index) {
        return groupSpecificationList.get(index);
    }

}
